import request from '@/utils/request.ts'
import type { LoginReq, LoginRes, UserInfoRes } from '@/api/user/types.ts'

enum ApiEnum {
  LOGIN = '/user/login',
  USER_INFO = '/user/info',
}

export const loginHttp = (data: LoginReq) => request.post<any, LoginRes>(ApiEnum.LOGIN, data)
export const userInfoHttp = () => request.get<UserInfoRes>(ApiEnum.USER_INFO)
